package com.cmbyc.todolist.service;

import com.cmbyc.todolist.VO.UpdateUserInfoQuery;
import com.cmbyc.todolist.VO.UserInfoVO;
import com.cmbyc.todolist.VO.UserShowVO;
import com.cmbyc.todolist.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cmbyc.todolist.utils.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author CYF
 * @since 2022-01-02
 */
public interface UserInfoService extends IService<UserInfo> {
    public UserInfo getUserByBId(String bid);

    public Result login(UserInfoVO userInfoVO, HttpServletResponse response, HttpServletRequest request);

    public Result logout(HttpServletResponse httpServletResponse, HttpServletRequest httpServletRequest);

    public Result register(UserInfoVO userInfoVO);

    public Result findUser(UserInfoVO userInfoVO);

    public Result validationEmail(UserInfoVO userInfoVO,HttpServletRequest request);

    public Result updatePassword(UserInfoVO userInfoVO,HttpServletRequest request);

    /**
     * 用户信息显示
     * @param bId
     * @return
     */
    UserShowVO userShow(String bId);

    /**
     * 用户名或密码修改
     * @param query
     * @return
     */
    Result updateUserInfo(UpdateUserInfoQuery query);
}
